<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml" xmlns:shiro="http://www.w3.org/1999/xhtml">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
<div class="wrapper wrapper-content ">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content">
                    <form class="form-horizontal m-t" id="signupForm">
                        <input id="pid" name="pid" th:value="${pid}" type="hidden">
                        <input id="coursesId" name="coursesId" th:value="${coursesId}" type="hidden">
                        <input id="state" th:value="${state}" type="hidden">
                        <input id="id"  th:value="${id}" type="hidden">
                         <div class="form-group">
                             <label class="col-sm-3 control-label"></label>
                            <div class="col-sm-8"  style="color: darkred">注意：回答不能修改，可以删除后重新回答！</div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">问题：</label>
                            <div class="col-sm-8">
                                <text id="questions" th:text="${questions}"></text>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">回答：</label>
                            <div class="col-sm-8">
                                <textarea id="contents" name="contents"  th:readonly="${#strings.isEmpty(answers)}  ? false : true" readonly
                                          class="form-control" style="height:300px" type="text" th:text="${answers}"></textarea>
                            </div>
                        </div>
                        <div class="form-group" th:if="${state==0}">
                            <div class="col-sm-8 col-sm-offset-3">
                                <button type="submit" class="btn btn-primary">提交</button>
                            </div>
                        </div>
                    </form>
                       <div class="form-group" th:if="${state==1}">
                            <div class="col-sm-8 col-sm-offset-3">
                                <button  th:onclick="'javascript:removeAnswers(\''+${id}+'\');'" class="btn btn-danger"><i class="fa fa-trash" aria-hidden="true"></i>删除回答</button>
                            </div>
                        </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div th:include="include::footer"></div>
<script src="//s.xlongwei.com/res/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="/js/webJs/jzweb/coustuQuestionsAnswers/add.js">
</script>
</body>
</html>
